<template>
    <div>
        <h3>专家详情页</h3>
        <van-sticky>
            <attentionDetail  />
        </van-sticky>
        <div class="cent">
            <span>精彩配音</span>
            <span> {{ num }} 篇</span>
        </div>
        <div class="content">
            <ul>
                <li v-for="item in data" :key="item.id" @click="clcikhandler(item.id)">
                    <van-image width="7rem" height="10rem" fit="cover" :src="item.src" />
                    <span>{{ item.name }}</span>
                    <span>{{ item.master }}</span>
                </li>
            </ul>
        </div>

    </div>
</template>

<script>
import { myReadApi } from "@/api/mineApi"
export default {
    
     data(){
        return {
            num:0,
            data:[]
        }
     },
     async created(){
        let a = await myReadApi()
        console.log(a , a.length)
        this.num = a.length
        this.data = a
     },
     methods:{
        clcikhandler(id){
            this.$router.push(`/drama/${id}`)
        }
     }
}
</script>

<style lang="scss" scoped>
.nav{
    background-color: yellow;
}
.cent{
    width: 70%;
    height: 50px;
    line-height: 50px;
    border-radius: 10px;
    display: flex;
    justify-content: space-around;
    font-size: 18px;
    left: 50px;
    position: absolute;
    background-color: pink;
}
    .content{
        width: 100%;
        margin: 0 auto;
        border-top: 1px solid aqua;
        background-color: aqua;
        // box-sizing: border-box;
        ul{
            margin-top: 50px;
            width: 100%;
            display: flex;
            justify-content:space-between;
            align-items: flex-start;
            flex-wrap: wrap;
        }
        ul>li{
            width: 32%;
            display: flex;
            flex-direction: column;
            justify-content: flex-start;
            align-items: flex-start;
        }
        
    }
</style>